* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*   Robustness Checks
*		11/18/24
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

use "AdsEmploymentMerged.dta", clear

* %%%%%%%% Probit %%%%%%%%%%%%%
* %%%%%%%% Table 6, Panel I. %%%%%%%%%%%%%
estimates clear
probit anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
  estpost margins, dydx(unempmpct)
eststo e1: margins

probit anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
  estpost margins, dydx(unempmpct)
eststo e2: margins

probit anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
  estpost margins, dydx(unempmpct)
eststo e3: margins

probit anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
 estpost margins, dydx(unempmpct)

eststo e4: margins

probit anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
 estpost margins, dydx(unempmpct)
eststo e5: margins


esttab e1 e2 e3 e4 e5
				  				 

* %%%%%%%%%%%% Female Demands %%%%%%%%%%
* %%%%%%%%%%%% Table 6, Panel II. %%%%%%%%%%

estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==0 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==0 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==0 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==0 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==0 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5
 
esttab e1 e2 e3 e4 e5 

* %%%%%%%%%%%% Foreign Posters' Demands %%%%%%%%%%
* %%%%%%%%%%%% Table 6, Panel III. %%%%%%%%%%
estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==1 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==1 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==1 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==1 , vce(cluster double_cluster1)
estimates store e4 

reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==1 , vce(cluster double_cluster1)
estimates store e5


esttab e1 e2 e3 e4 e5 

* %%%%%%%%%% Control for the Number of Demands & Ad Length %%%%%%%%%%
* %%%%%%%%%%%% Table 6, Panel IV. %%%%%%%%%%
cap drop N 
cap drop adlength
gen adlength=askerlength+askeelength
bys year province askermale agegr edlvl: gen N=_N if askermale~=.

estimates clear
reg anyforeignwanted unempmpct N adlength i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & adlength~=., vce(cluster double_cluster1)
 estimates store e1 
 
reg anyagewanted unempmpct N adlength i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)  
estimates store e2 
 
reg anyoccwanted unempmpct N adlength i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3 
 
reg anylookswanted unempmpct N adlength i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct N adlength i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 
  
* %%%%%% Non-business owners %%%%%%%%% 
* %%%%%%%%%%%% Table 6, Panel V. %%%%%%%%%%
 
estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & bizself==0, vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & bizself==0, vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & bizself==0, vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & bizself==0, vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & bizself==0, vce(cluster double_cluster1)
estimates store e5
 
esttab e1 e2 e3 e4 e5  
 
* %%%%%%%%%%% Table 6, Panel VI. %%%%%%%%%
* %%%%%%%%%%% GDP Growth Rate %%%%%%%%% 
estimates clear
reg anyforeignwanted gdp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
 
estimates store e1 

reg anyagewanted gdp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted gdp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted gdp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4 

reg anyeducwanted gdp i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 

				  
* %%%%%% Analsis for the 1990s %%%%%%%%% 
* %%%%%%%%%%%% Table 6, Panel VII. %%%%%%%%%%
 
estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & year>=1990, vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & year>=1990, vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & year>=1990, vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & year>=1990, vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & year>=1990, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 

* %%%%%% Middle and High Income Class %%%%%%%%%  
* %%%%%%%%%%%% Table 6, Panel VIII. %%%%%%%%%%
 
estimates clear
reg anyforeignwanted unempmpcthc i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpcthc i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpcthc i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpcthc i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpcthc i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5 

* %%%%%% Posters who use specific words %%%%%%%%%  
* %%%%%%%%%%%% Table 6, Panel IX. %%%%%%%%%%

estimates clear
reg anyforeignwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & selfed>1 , vce(cluster double_cluster1)
estimates store e1 

reg anyagewanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & selfed>1, vce(cluster double_cluster1)
estimates store e2

reg anyoccwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & selfed>1 , vce(cluster double_cluster1)
estimates store e3

reg anylookswanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & selfed>1, vce(cluster double_cluster1)
estimates store e4
 
reg anyeducwanted unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 & selfed>1, vce(cluster double_cluster1)
estimates store e5

esttab e1 e2 e3 e4 e5  
				  

* %%%%%% Examining selection changes in ad posters' status %%%%%%%%%  
* %%%%%%%%%%%%% Table A7 %%%%%%%%%%%%

estimates clear
reg anyoccself unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e1 

reg bizself unempmpct i.agegr i.year i.province i.edlvl ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e2 

reg propertyself unempmpct i.agegr i.year i.province i.edlvl ///
anystatusself_s  ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e3

reg anystatusself_s unempmpct i.agegr i.year i.province i.edlvl ///
anystatusself_s  ///
 if askermale==1 & anyforeignself==0 , vce(cluster double_cluster1)
estimates store e4

esttab e1 e2 e3 e4 


